<?php
//author yonkz
	Yii::app()->clientScript->registerScript('search', "
		$('form#search_kibC').submit(function(){
			$.fn.yiiGridView.update('kibC-grid', {
				data: $(this).serialize()
			});
			return false;
		});
	");
?>

<h1 style="margin-top:0px; text-decoration:underline">PENCARIAN DATA KIB C</h1>

<?php $this->renderPartial('_search',array('model'=>$model)); ?>
<?php 
	$this->widget('bootstrap.widgets.TbGridView', array(
		'id' => 'kibC-grid',
		'dataProvider'=>$model->search(),
		'type' => 'striped bordered condensed',
		'pager' => array(
			'header' => '',
			'cssFile' => false,
			'selectedPageCssClass' => 'active',
			'hiddenPageCssClass' => 'disabled',
			'firstPageCssClass' => 'previous',
			'lastPageCssClass' => 'next',
			'firstPageLabel' => 'First',
			'lastPageLabel' => 'Last',
			'prevPageLabel' => 'Prev',
			'nextPageLabel' => 'Next',
		),
		'columns'=>array(
			array(
				'header' => 'Kode KC',
				'value' => '$data->kode_kc',
			),    
			array(
				'header' => 'No Register',
				'value' => '$data->no_reg',
			),    
			array(
				'header' => 'Alamat',
				'value' => '$data->alamat',
			),    
			array(
				'header' => 'Tgl Dokumen',
				'value' => '$data->tgl_dok',
			),    
			array(
				'header' => 'Kode Pemilik',
				'value' => '$data->kode_milik',
			),    
			
			array(
				'class' => 'bootstrap.widgets.TbButtonColumn',
				'template' => '{update} ',
				'buttons' => array(
					'update' => array(
						'url' => 'Yii::app()->createUrl("KIB/kibC/update", array("id"=>$data->kode_kc))',
					),
				),
				'htmlOptions' => array('style' => 'width: 8%;text-align: center;'),
			),
			array(
				'class' => 'bootstrap.widgets.TbButtonColumn',
				'template' => '{delete} ',
				'buttons' => array(
					'delete' => array(
						'url' => 'Yii::app()->createUrl("KIB/kibC/delete", array("id"=>$data->kode_kc))',
					),
				),
				'htmlOptions' => array('style' => 'width: 8%;text-align: center;'),
			)
		),
	));
?>